import Vue from 'vue'
import App from './App'
import store from "./store/index.js"
import "./static/fonts/iconfont.css"
import {
	plugins
} from "./plugins/plugins.js"
Vue.config.productionTip = false

App.mpType = 'app'

import VueI18n from 'vue-i18n'
import {
	zhCn
} from "static/lang/zh-cn.js"
import {
	enUs
} from "static/lang/en-us.js"
Vue.use(VueI18n);
let globalData = uni.getStorageSync("globalData");
globalData && (globalData = JSON.parse(globalData));

const i18n = new VueI18n({
	locale: globalData ? globalData.lang || 'zh-CN' : 'zh-CN',
	messages: {
		'en-US': enUs,
		'zh-CN': zhCn
	}
});
console.log(i18n.locale)

import amapFile from "./libs/amap-wx.js"

Vue.prototype._i18n = i18n
Vue.prototype._plugins = plugins
Vue.prototype.$toast = plugins.toast;
Vue.prototype._amap = amapFile;

const app = new Vue({
	store,
	...App
})
app.$mount()
